Figuring out a Fair Price of a Used Car in a Data Science Way

The whole journey of using DS methods to calculate a fair price for a used car.

Introduction

Original ad of late 1990s VW Passat estate in “Rosso corsa” color, which turned out to be the “average car” in Belarus according to dataset statistics

Stage 1. Collecting the data

Stage 2. Looking at the big picture and dealing with bad data

Odometer_value distribution (it is a distance traveled by a vehicle in kilometers)
Distribution of the cars in the catalog by their production year.
price distribution
distribution of up_counter metric
Distribution of number of photos that listed cars have
Histogram that illustrates the migration from rear-wheel drive to front- and all- wheel drive over the past years
Correlation matrix for the whole dataset

Stage 3. Model training

Stage 4. Model evaluation

Plot illustrates model training: number of trees on X-axis and MAE $ on the Y-axis
Best validation MAE score: $1019.18 on iteration 6413 with std $12.84
Distribution of errors
2d histogram plot for true and predicted values. You can notice the dense region below $3000 threshold
Summary_plot for top 20 features

Stage 5. Exploring individual predictions using domain knowledge and figuring out limitations of the model

Prediction interpretation (force_plot) for T5 Caravelle
Prediction interpretation (decision_plot) for T5 Caravelle
Prediction interpretation for E270 Mercedes
Prediction interpretation for Jeep Grand Cherokee
Prediction interpretation for VW Passat
Prediction interpretation for VAZ 2107
Prediction interpretation for emergency VW Passat
Actual image of the “emergency” VW Passat sample
Prediction interpretation for BMW 316

Technical conclusion

Overall conclusion


Towards Data Science

A Medium publication sharing concepts, ideas, and codes.

Kirill Lepchenkov

Written by

Data scientist at iTechArt

Towards Data Science

A Medium publication sharing concepts, ideas, and codes.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

To make Medium work, we log user data. By using Medium, you agree to our Privacy Policy, including cookie policy.